<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            font-size: 20px;
            color: #f40e0e;
        }
    </style>
</head>
<body>
    <div style="font-size: 10px;">这是一个div</div>
</body>
<script>
    let div=document.querySelector("div");
    //console.log(1111);
    div.onclick=function(){
        let num=parseInt(div.style.fontSize);
        num+=10;
       num= num+"px";
        div.style.fontSize=num;

    }
</script>
</html>